/*
 * GeoVISTA Center (Penn State, Dept. of Geography)
 * Copyright (c), 2003-2011,  Jin Chen and Alan M. MacEachren, GeoVISTA Center, Penn State University
 * Licensed under Simplified BSD License
 *
 *
 * @author: jin Chen 
 * @date: Jun 14, 2005$
 * @version: 1.0
 */
package edu.psu.geovista.app.hce.dendroview.gui;


import epoviz.trex.common.swing.frame.tool.BasicMouseTool;

import java.awt.event.MouseEvent;

public class MouseWorker extends BasicMouseTool {
    HighlightablePlot plot;
    public MouseWorker() {

    }

     public void mouseMoved(MouseEvent e) {
       super.mouseMoved(e);
        /* MosaicPlotSizes sizes = plot.getSizes();
         int index = sizes.getIndex(e.getX(),e.getY());*/
         int index =  plot.getIndex(e.getX(),e.getY());
         if(index>=0){
         //System.out.println(" in obsr:"+index);
         plot.hightlightCluster(index,e.getX() ,e.getY() );
         }
     }

    public void setPlot(HighlightablePlot plot) {
        this.plot = plot;
        this.plot.addMouseMotionListener(this);
    }
}
